home *** CD-ROM | disk | FTP | other *** search
/ BBS Toolkit / BBS Toolkit.iso / pc_board / bbsfind1.zip / PCBTEST.BAT < prev    next >
DOS Batch File  |  1992-04-26  |  2KB  |  52 lines

  1. ECHO      THIS FILE WILL NOT RUN IN THIS CONDITION!!
  2. ECHO      YOU MUST DELETE THE COMMENTS FIRST!!
  3. goto end
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12. echo off
  13. @echo ■ Checking for included FILE_ID.DIZ for description
  14. if %2 == UPLOAD pcbdesc %1 %3
  15.  
  16. whatext %1                   -> finds the dos file extention for the U/L'd file
  17. if errorlevel == 6 goto arj
  18. if errorlevel == 1 goto zip
  19. goto end
  20.  
  21. :zip                                 ->  It's a ZIP!
  22. echo ■ Testing ZIP file integrity    ->  Tell the user what's going on
  23. @pkunzip -t %1 > pcbfail.txt         ->  send results of test to user
  24. @if errorlevel == 1 goto end         ->  if ZIP fails CRC checks quit now.
  25.  
  26. @ren %1 f:\pcb\privupld\$$$.zip  >NUL ->  Rename to prevent false alarms
  27. @f:\tc\bbsfind %1                >NUL ->  Check for duplications with any ext
  28. @ren f:\pcb\privupld\$$$.zip %1  >NUL ->  Rename file back to original name
  29. @if errorlevel == 1 goto exists       ->  File exists, OH NO!
  30. @del pcbfail.txt                 >NUL ->  File is new  GOODY!
  31. goto end
  32.  
  33. :arj                                  ->   The same comments apply here as for
  34. @echo ■ Testing ARJ file integrity    ->   the ZIP area.
  35. @arj -t %1 > pcbfail.txt
  36. @if errorlevel == 1 goto end
  37. @ren %1 f:\pcb\privupld\$$$.arj  >NUL
  38. @f:\tc\bbsfind %1                >NUL
  39. @ren f:\pcb\privupld\$$$.arj  %1 >NUL
  40. @if errorlevel == 1 goto exists
  41. @del pcbfail.txt                 >NUL
  42. @goto end
  43.  
  44.  
  45. :exists          ->  Tell the user they uploaded a duplicate
  46. Echo File already Exists under another extention > pcbfail.txt
  47. del %1           ->  Kill the recently uploaded file (it's a dupe anyway!)
  48.  
  49.  
  50. :end
  51.  
  52.